﻿@model NCP.Recruiting.ApplicationServices.ViewModels.JobPositionListItemModel
@using NCP.Recruiting.WebApp.Models;
<tr>
    <td>
        @Html.CheckBoxFor(x => x.ItemChecked, new { @class = "itemChecked" })
    </td>
    <td>
        @if (!Model.Deleted)
        {
            if (Model.Status == (int)JobPositionStatus.Active)
            {
                <img src="/Content/images/tag2.png" width="24" height="24" />
            }
            else if (Model.Status == (int)JobPositionStatus.Pause)
            {
                <img src="/Content/images/tag4.png" width="24" height="24" />
            }
            else if (Model.Status == (int)JobPositionStatus.Closed)
            {
                <img src="/Content/images/tag3.png" width="24" height="24" />
            }
        }
        @*@Html.DisplayFor(x => x.Status)*@
    </td>
    <td>
        @Html.DisplayFor(x => x.SortOrder)
    </td>
    <td>
        @Html.TextBoxFor(x => x.SortOrder, new { @class = "sortOrder", style = "width:30px", maxlength = "2", idValue = Model.Id, oldValue = Model.SortOrder })
    </td>
    <td style="text-align:left">
        @Html.HiddenFor(x => x.JobTitle)
        @Html.DisplayFor(x => x.JobTitle)
    </td>
    <td>
        @Html.DisplayFor(x => x.DepartmentName)
    </td>
    <td>
        @Html.DisplayFor(x => x.Address)
    </td>
    <td>
        @Html.DisplayFor(x => x.DateCreated)
    </td>
    <td>
        @Html.DisplayFor(x => x.StartDate)
    </td>
    <td>
        @Html.DisplayFor(x => x.Reposted)
    </td>
    <td>
        @Html.DisplayFor(x => x.EndDate)
    </td>
    <td>
        @Html.DisplayFor(x => x.DateDeleted)
    </td>
    <td></td>
    <td>
        @Html.HiddenFor(x => x.Id, new { id = "hidId" })
        @Html.HiddenFor(x => x.Status, new { id = "hidStatus" })
        @Html.ActionLink("编辑", "Edit", new { id = Model.Id }, new { id = "btnEdit", style = Model.Deleted ? "display:none" : "" })
        <a href="#" class="restore" style="@(!Model.Deleted ? "display:none" : "")">还原</a>
        <button class="select" style="@(Model.Deleted ? "display:none" : "")"></button>
    </td>
</tr>
